<?php
// $Id: AreaController.php 607 2012-12-16 08:44:10Z tomqin@gmail.com $

/**
 * Part of the framework.
 *
 * @package     FrontController
 * @version     1.0
 * @copyright   Copyright (C) 2010-2012 SupeFun.com Inc.
 * @author      TomQin <tomqin@gmail.com>
 * @license     http://www.supefun.com/license/
 */

class AreaController extends FrontController{

    function indexAction(){
        $areaid = get_request('areaid', 0);

        $data = Base::getObject('service.area.AreaManager')
              ->get($areaid);
        echo json_encode($data);
    }

    function listAction(){
        $data = Base::getObject('module.AreaModule')
              ->fetchCache()
              ->getArr();
        echo json_encode($data);
    }
}

?>